import request from '@/utils/request';

/**
 * 中心站统计
 * @returns
 */
export const fetchCenterStationCount = () => {
  return request({
    url: 'dataScreen/centerStationCount',
  });
};

/**
 * 设备状态统计
 * @returns
 */
export const fetchDeviceStatus = () => {
  return request({
    url: 'dataScreen/getDeviceStatusStatics',
  });
};

/**
 * 设备类型统计
 * @returns
 */
export const fetchDeviceType = () => {
  return request({
    url: 'dataScreen/getDeviceTypeStatics',
  });
};

/**
 * 系统报警排行
 * @returns
 */
export const fetchSysAlarmRanking = (params: any) => {
  return request({
    url: 'dataScreen/getSystemAlarmList',
    params,
  });
};

/**
 * 台站数量统计
 * @returns
 */
export const fetchStationCount = () => {
  return request({
    url: 'dataScreen/stationCount',
  });
};

/**
 * 台站列表
 * @returns
 */
export const fetchStationList = (params: any) => {
  return request({
    url: 'dataScreen/stationList',
    params,
  });
};

/**
 * 查询中心站详情
 * @returns
 */
export const fetchCenterStationListDetail = (params: any) => {
  return request({
    url: 'dataScreen/getCenterStationDetail',
    params,
  });
};

/**
 * 设备厂商
 * @returns
 */
export const fetchManufacturers = () => {
  return request({
    url: 'dataScreen/manufacturerList',
  });
};
/**
 * 设备监控告警
 * @returns
 */
export const fetchDeviceAlarm = (params: any) => {
  return request({
    url: 'dataScreen/getDeviceAlarmList',
    params,
  });
};

/**
 * 数据监控告警
 * @returns
 */
export const fetchDataAlert = (params: any) => {
  return request({
    url: 'dataScreen/getDataAlarmList',
    params,
  });
};

/**
 * 应用监控告警
 * @returns
 */
export const fetchAppAlarm = (params: any) => {
  return request({
    url: 'dataScreen/getAppAlarmList',
    params,
  });
};

/**
 * 最新故障
 * @returns
 */
export const fetchNewFault = (params: any) => {
  return request({
    url: 'operationOrder/list',
    params,
  });
};

/**
 * 故障工单排行
 * @returns
 */
export const fetchOrderRanking = (params: any) => {
  return request({
    url: 'dataScreen/getOrderRankingList',
    params,
  });
};

/**
 * 告警通知排行
 * @returns
 */
export const fetchAlarmNotice = (params: any) => {
  return request({
    url: 'dataScreen/getAlarmNoticeList',
    params,
  });
};

/**
 * 故障问题解决时效
 * @returns
 */
export const fetchSolutionLimit = (params: any) => {
  return request({
    url: 'dataScreen/getOrderRankingTimeList',
    params,
  });
};
/**
 * 中心站工作量统计
 * @returns
 */
export const fetchCenterWork = (params: any) => {
  return request({
    url: 'dataScreen/getCenterWorkloadList',
    params,
  });
};
/**
 * 中间告警数据
 * @returns
 */
export const fetchCenterAlarm = (params: any) => {
  return request({
    url: 'dataScreen/getCenterAlarmList',
    params,
  });
};
